package com.ruoyi.business.controller;

import com.ruoyi.business.domain.CarPackageAudit;
import com.ruoyi.business.domain.ServiceItem;
import com.ruoyi.business.service.ICarPackageAuditService;
import com.ruoyi.business.service.IDoneService;
import com.ruoyi.business.service.IProcessService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.BusinessException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@RequestMapping("/business/done")
public class DoneController extends BaseController {

    private String prefix = "business/task";

    @Autowired
    private IProcessService processService;
    @Autowired
    private IDoneService doneService;

    @GetMapping
    public String done()
    {
        return prefix + "/donePage";
    }

    /**
     * 查询审核列表列表
     */
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(CarPackageAudit carPackageAudit)
    {
        List<CarPackageAudit> list = doneService.findDoneList(carPackageAudit);
        return getDataTable(list);
    }
}
